package com.dd.stack.es.pojo.es;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;

import java.io.Serializable;

/**
 * @Author liuxianmeng
 * @CreateTime 2025/4/6 16:36
 * @Description Elasticsearch实践DO类 Product产品实体
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("ES产品DO -> @Document注解指定该实体类对应的Elasticsearch索引名称为product")
@Document(indexName = "product")
@TableName("product")
public class ProductESDO implements Serializable {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("id -> @Id注解用于标识实体类中的唯一标识字段")
    private String id;
    @ApiModelProperty("产品名")
    private String name;
    @ApiModelProperty("产品价格")
    private Double price;
    @ApiModelProperty("产品描述")
    private String description;
}
